/**   
* @Title: Proposal.java
* @Package me.paxos.bean
* @Description: TODO
* @author xaoyaoyao
* @date Dec 25, 2018 11:47:17 AM
* @version V1.0   
*/
package me.paxos.bean;

import java.io.Serializable;

/**
 * @ClassName: Proposal
 * @Description: 提案
 * @author xaoyaoyao
 * @date Dec 25, 2018 11:47:17 AM
 * 
 */
public class Proposal implements Serializable {

	private static final long serialVersionUID = 3167886776970093765L;
	// 提案的序列号
	private int id;
	// 提案名称
	private String name;
	// 提案的值
	private String value;

	public Proposal() {
		super();
	}

	public Proposal(int id, String name, String value) {
		super();
		this.id = id;
		this.name = name;
		this.value = value;
	}

	/**
	 * @return id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return value
	 */
	public String getValue() {
		return value;
	}

	/**
	 * @param value
	 *            the value to set
	 */
	public void setValue(String value) {
		this.value = value;
	}
	
	public void copyFromInstance(Proposal proposal) {
		this.id = proposal.id;
		this.name = proposal.name;
		this.value = proposal.value;
	}

	@Override
	public String toString() {
		return "Proposal [id=" + id + ", name=" + name + ", value=" + value + "]";
	}

}
